package com.yzxb.messystem.entity;

import java.time.LocalDateTime;

/**
 * 产品实体类
 */
public class Product {
    private Long id;
    
    private String productCode;
    
    private String productName;
    
    private String description;
    
    private String category;
    
    private Double price;
    
    private Integer stockQuantity;
    
    private LocalDateTime createTime;
    
    private LocalDateTime updateTime;
    
    // 这些方法可以在服务层中处理，或者通过MyBatis-Plus的插件来实现
    public void setCreateTimeDefault() {
        createTime = LocalDateTime.now();
        updateTime = LocalDateTime.now();
    }
    
    public void setUpdateTimeDefault() {
        updateTime = LocalDateTime.now();
    }
    
    // Getters and Setters
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public String getProductCode() {
        return productCode;
    }
    
    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }
    
    public String getProductName() {
        return productName;
    }
    
    public void setProductName(String productName) {
        this.productName = productName;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public String getCategory() {
        return category;
    }
    
    public void setCategory(String category) {
        this.category = category;
    }
    
    public Double getPrice() {
        return price;
    }
    
    public void setPrice(Double price) {
        this.price = price;
    }
    
    public Integer getStockQuantity() {
        return stockQuantity;
    }
    
    public void setStockQuantity(Integer stockQuantity) {
        this.stockQuantity = stockQuantity;
    }
    
    public LocalDateTime getCreateTime() {
        return createTime;
    }
    
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }
    
    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
}